<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改渠道管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-channelsub-edit" th:object="${channelSubUser}">
            <input name="id" th:field="*{id}" type="hidden">
             <div class="form-group">    
                <label class="col-sm-3 control-label">登录帐号：</label>
                <div class="col-sm-8">
                    <input name="user.loginName" readonly="true" class="form-control" type="text" maxlength="30" th:field="*{user.loginName}" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">渠道名称：</label>
                <div class="col-sm-8">
                    <input name="channelName" readonly="true" th:field="*{channelName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">渠道缩写：</label>
                <div class="col-sm-8">
                    <input name="channelAcronym" readonly="true" th:field="*{channelAcronym}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">渠道类型：</label>
                <div class="col-sm-8">
                    <select name="model" class="form-control"  required>
                			<div th:if="${@permission.isAnyRoles('ROLE_ADMIN,ROLE_NBGHZZ,ROLE_CHANNEL')}">
                				<option value="NORMAL">普通</option>
                			</div>
							<div th:if="${@permission.isAnyRoles('ROLE_ADMIN,ROLE_NBGHZZ')}" >
								<option value="GUILD" th:field="*{model}">公会</option>
								<option value="AGENT" th:field="*{model}">代理商</option>
								<option value="STUDIO" th:field="*{model}">工作室</option>
								<option value="ANCHOR" th:field="*{model}">主播</option>
								<option value="SITES" th:field="*{model}">网站</option>
								<option value="APP" th:field="*{model}">APP</option>
								<option value="WechatH5" th:field="*{model}">微信H5</option>
								<option value="OTHER" th:field="*{model}">其他</option>
		                    </div>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">结算方式：</label>
                <div class="col-sm-8">
                    <select name="settleType" class="form-control m-b" th:with="type=${@dict.getType('cwsk_settle_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{settleType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">结算周期：</label>
                <div class="col-sm-8">
                    <select name="settlePeriod" class="form-control m-b" th:with="type=${@dict.getType('cwsk_settle_period')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{settlePeriod}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">查看游戏收益统计：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'gameIncomeStatPower_' + dict.dictCode}" name="gameIncomeStatPower" th:value="${dict.dictValue}" th:field="*{gameIncomeStatPower}">
                        <label th:for="${'gameIncomeStatPower_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">查看渠道收益统计：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'channelProfitPower_' + dict.dictCode}" name="channelProfitPower" th:value="${dict.dictValue}" th:field="*{channelProfitPower}">
                        <label th:for="${'channelProfitPower_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">查看用户注册明细：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'registrationPower_' + dict.dictCode}" name="registrationPower" th:value="${dict.dictValue}" th:field="*{registrationPower}">
                        <label th:for="${'registrationPower_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">查看充值明细：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'rechargePower_' + dict.dictCode}" name="rechargePower" th:value="${dict.dictValue}" th:field="*{rechargePower}">
                        <label th:for="${'rechargePower_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">查看CPS用户注册明细：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'cpsRegistrationPower_' + dict.dictCode}" name="cpsRegistrationPower" th:value="${dict.dictValue}" th:field="*{cpsRegistrationPower}">
                        <label th:for="${'cpsRegistrationPower_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否允许代充：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('cwsk_special_power')}">
                        <input type="radio" th:id="${'allowGeneration_' + dict.dictCode}" name="allowGeneration" th:value="${dict.dictValue}" th:field="*{allowGeneration}">
                        <label th:for="${'allowGeneration_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            
            <div class="form-group">    
                <label class="col-sm-3 control-label">收款方户名：</label>
                <div class="col-sm-8">
                    <input name="accountName" th:field="*{accountName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收款银行：</label>
                <div class="col-sm-8">
                    <input name="accountBank" th:field="*{accountBank}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">收款方帐号：</label>
                <div class="col-sm-8">
                    <input name="accountNumber" th:field="*{accountNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系人：</label>
                <div class="col-sm-8">
                    <input name="contact" th:field="*{contact}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">QQ：</label>
                <div class="col-sm-8">
                    <input name="qq" th:field="*{qq}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系电话：</label>
                <div class="col-sm-8">
                    <input name="mobile" th:field="*{mobile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">手机号：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">邮箱：</label>
                <div class="col-sm-8">
                    <input name="email" th:field="*{email}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>
            
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "cwsk/channelsub";
        $("#form-channelsub-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-channelsub-edit').serialize());
            }
        }
    </script>
</body>
</html>